
SLIB := $(LIBPATH)/lib$(DIRNAME).a

all: $(SLIB) $(DLIB)

$(DLIB): $(OBJECTS)
	$(GPP) -shared $(DFLAGS) -o $@ $(OBJECTS)

$(SLIB): $(OBJECTS)
	$(AR) -rc -o $@ $(OBJECTS)

$(OBJDIR)/%.o: %.c
	$(GCC) $(CFLAGS) -o "$@" "$<" $(INCLUDE)

$(OBJDIR)/%.o: %.cpp
	$(GPP) $(CFLAGS) -o "$@" "$<" $(INCLUDE)

clean: 
	@rm -rf $(OBJECTS)
	@rm -rf $(SLIB)
	@rm -rf $(DLIB)
